#include <iostream>

int factorial(int);

int main()
{
	int number;

	std::cout << "Enter number: ";
	do
	{
		std::cin >> number;
	}
	while(number < 0);

	int num = factorial(number);
	std::cout << number << "! = " << num << std::endl;

	int number_0 = 0;
	int n = 1;
	do
	{
		n = num % 10;

		if(0 == n)
		{
			++number_0;
		}
		else
		{
			break;
		}
		
		num /= 10;
	}
	while(num > 0);

    std::cout << "0: " << number_0 << std::endl;    		
	
	return 0;
}

int factorial(int number)
{
	if(1 == number)
	{
		return 1;
	}
	return number * factorial(number - 1);
}